package pub.wkq.thread;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

/**
 * @author 王开琦
 */
public class CompletableApplyChained {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        CompletableFuture<Machina> completableFuture = CompletableFuture.completedFuture(new Machina(0))
                .thenApply(Machina::work)
                .thenApply(Machina::work)
                .thenApply(Machina::work)
                .thenApply(Machina::work)
                ;
    }
}
